import { Controller, Get, Req, Res, Post, Body } from '@nestjs/common';
import { UserService } from './user.service';


@Controller('user')
export class UserController {
  constructor(private readonly userService: UserService) { }

  @Get()
  create() {
    return '123'
  }

  @Get('code')
  getCode(@Req() req, @Res() res) {
    return this.userService.getCode(req, res)
  }

  @Post('create')
  createUser(@Req() req, @Body() body) {
    return this.userService.createUser(req, body)
  }
}
